//
//  JPFMaskView.h
//  JPFFramework
//
//  Created by JPFei on 17/11/14.
//  Copyright © 2017年 JPFFramework. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "JPFScrollView.h"

@protocol JPFMaskViewDelegate <NSObject>

@optional
- (void)maskViewShow;
@optional
- (void)maskViewDisappear;

@end

@interface JPFMaskView : JPFScrollView

@property (nonatomic, strong) UITapGestureRecognizer *tapGestureRecognizer;
@property (nonatomic, strong) UIView *mainView;
@property (nonatomic) BOOL canTapBackDisappear;

@property (nonatomic, strong) id<JPFMaskViewDelegate> maskDelegate;
@property (nonatomic, copy) void (^disappearBlock)(void);
@property (nonatomic, copy) void (^tapBackBlock)(void);
@property (nonatomic, copy) void (^tapMainViewBlock)(void);
@property (nonatomic, copy) void (^tapBlock)(BOOL isInMainView,CGPoint point);

- (instancetype)initWithMainView:(UIView *)view;

//显示关闭之前的
- (void)show;
- (void)showInView:(UIView *)view;
//显示是否关闭之前的可控
- (void)show:(BOOL)hiddenOther;
- (void)showInView:(UIView *)view hiddenOther:(BOOL)hiddenOther;
- (void)disappear;
- (BOOL)isShowing;

+ (JPFMaskView *)currentShow;

@end
